package pers.wy.sell.domain;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import pers.wy.sell.enums.OrderStatusEnum;
import pers.wy.sell.enums.PayStatusEnum;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单
 *
 * @Author: 月落
 * @Date: Created in 15:33 2018/9/5
 */
@Entity
@Data
@DynamicUpdate
public class OrderMaster {

    @Id
    private String orderId; // 订单ID

    private String buyerName; // 买家名称

    private String buyerPhone; // 买家联系方式

    private String buyerAddress; // 买家地址

    private String buyerOpenid; // 买家微信Openid

    private BigDecimal orderAmount; // 订单总金额

    private Integer orderStatus = OrderStatusEnum.NEW.getCode(); // 订单状态,默认为新订单

    private Integer payStatus = PayStatusEnum.WAIT.getCode(); // 支付状态,默认为未支付

    private Date createTime; // 创建时间

    private Date updateTime; // 更新时间

}
